package persistentie;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import domein.Locatie;

public class RoutesDB {
	
	public double read(String query) throws SQLException,IllegalStateException, ClassNotFoundException {
		Connectie connectie = new Connectie();
		ResultSet resultSet;
		double result = 0;
		
		try {
			resultSet = connectie.executeQuery(query);

			while (resultSet.next()) {
				result = resultSet.getInt("result");
			}

		} catch (Exception e) {
			e.printStackTrace();
			System.out.print("error");
		}

		connectie.closeConnection();
		
		return result;
	}
}
